Technical Q&As
QTW 89 - Calling InitializeQTML from DLL Main (21-September-98)
Q Is there a known problem calling the QuickTime 3 for Windows InitializeQTML(0) function from the DllMain procedure of a DLL?
A Yes, but there's more to it than that. It's a known problem on Windows with calling LoadLibrary or FreeLibrary (or any of several other APIs) from the DllMain procedure of a DLL. The basic rule of thumb on Windows is: "Don't do anything significant in your DLL Main." Moreover, don't *ever* call DLL-related APIs.
Instead, I would recommend adding an Initialize call to your DLL that calls InitializeQTML , and a Terminate call that calls TerminateQTML . That avoids the problem entirely.
-- Scott Kuechle
Worldwide Developer Technical Support
Technical Q&As
Previous Question |
Contents | Next Question
To contact us, please use the Contact Us page.
|